-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed alpha from base class #35
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
==========================================
- Coverage 90.77% 90.52% -0.26%
==========================================
Files 7 7
Lines 629 644 +15
==========================================
+ Hits 571 583 +12
- Misses 58 61 +3 ☔ View full report in Codecov by Sentry. |
Awesome! Would you mind just adding one test and updating the documentation with the alpha property? |
@zoccoler actually - I am just realizing that the relevant change is missing on this branch (I am so confused), but I also don't manage to implement it properly. I keep getting errors due to The problem is that, if color indeces is updated before alpha is updated, then the color values don't match the number of alpha values any more and vice versa. I think we may have to think about this problem a bit more before moving on with the implementation 🤔 |
@zoccoler - changed the PR description and content (see description on top) |
Fixes #31 #34
Hi @zoccoler ,
I changed this PR to fix a number of mutually depending issues. The key change is that I added a check to the data setter method. The plot is now redrawn unless the shape/length of the passed data has changed. If the size of the data is the same as before, then only the point properties (
alpha
,size
,color_indices
) are kept.This invalidates the feature of adding new data but I believe it is worth. From the clusters-plotter perspective it makes a lot of sense: Changing the columns of a feature table would correspond to passing new xy values with the same shape - in this case you'd want to keep the other properties (coloring, etc). Adding data of a different shape would correspond to selecting data from a different layer, in which case the coloring and other properties of the previous plot wouldn't make any sense any more, any more and should be reset.
I added some steps to the documentation notebook that hopefully illustrate the concept. The changes also only concern the scatter artist so I am hoping that it would keep other functionality (e.g., of the histogram) untouched